package model;
import java.sql.*;

import connection.DbConnection;
import bean.PollUser;

public class AssignUserImpl {
	
	public AssignUserImpl(String listid, String isTemplate, String listname, String masterUsername, String user){
		Connection conn = new DbConnection().getConn();
		try{
			String sql = "INSERT INTO ParticipantList(listid, isTemplate, name, masterUsername, username) VALUES(";
			sql+=listid + ", ";
			sql+="'"+isTemplate+"' ,";
			sql+="'N' ,";
			sql+="'"+masterUsername+"' ,";
			sql+="'"+user+"' )";
			System.out.println(sql);
			PreparedStatement ps = conn.prepareStatement(sql);
			ps.executeQuery();
		}catch(SQLException e){
			System.out.println(e.toString());
		}
		System.out.println("impl created");
	}
}
